package demo8.demo1;

import org.apache.logging.log4j.util.PerformanceSensitive;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Component
@PropertySource(value = "classpath:/dept.properties",encoding = "utf-8")
//@PropertySource(value = "classpath:/dept.properties",encoding = "utf-8")
public class dept {
    @Value("${dept.name}")
    private String name;
    @Value("${dept.id}")
    private Integer id;
    public void hello(){
        System.out.println(name+id);
    }
}
